﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using VatTuDAO1;
using VatTuDTO;


namespace VatTuBUS1
{
    public class HoaDonBUS
    {
        public List<HoaDonDTO> SelectHoaDon()
        {
            return new HoaDonDAO().SelectHoaDon();
        }

        public HoaDonDTO SelectHoaDon(int maHoaDon)
        {
            return new HoaDonDAO().SelectHoaDon(maHoaDon);

        }

        public Boolean InsertHoaDon(HoaDonDTO HoaDon)
        {
            return new HoaDonDAO().InsertHoaDon(HoaDon);
             
        }
        //update MaTinHTrang hoa don 
        public Boolean UpdateHoaDon(int MaHoaDon,int maTinhTrang)
        {
            return new HoaDonDAO().UpdateHoaDon(MaHoaDon, maTinhTrang);
        }
        //UPdate hinh thuc thanh toan
        public Boolean UpdateHoaDonHinhThucThanhToan(int maHoaDon,string hinhThucThanhToan)
        {
            return new HoaDonDAO().UpdateHoaDonHinhThucThanhToan(maHoaDon, hinhThucThanhToan);
        }


        public Boolean DeleteHoaDon(int MaHoaDon)
        {
            return new HoaDonDAO().DeleteHoaDon(MaHoaDon);
        }

        public int LayMaHoaDonMoi()
        {
            return new HoaDonDAO().LayMaHoaDonMoi();
        }
    }
}
